package com.ruoyi.fire.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.fire.domain.DWaterDeviceMessage;
import com.ruoyi.fire.mapper.DWaterDeviceMessageMapper;
import com.ruoyi.fire.service.IDWaterDeviceMessageService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PackageName: com.iot.fire.service.impl
 * @ClassName: DWaterDeviceMessageServiceImpl
 * @Description:
 * @Author: czl
 * @Date: 2025/11/10 23:18
 */
@Service
public class DWaterDeviceMessageServiceImpl extends ServiceImpl<DWaterDeviceMessageMapper, DWaterDeviceMessage> implements IDWaterDeviceMessageService {


    /**
     * 根据设备编号查询列表
     * @param deviceId 设备编码
     * @return
     */
    @Override
    public List<DWaterDeviceMessage> selectByDeviceId(String deviceId) {
        LambdaQueryWrapper<DWaterDeviceMessage> wrapper = Wrappers.lambdaQuery(DWaterDeviceMessage.class);
        wrapper.eq(DWaterDeviceMessage::getWaterId, deviceId);
        return list(wrapper);
    }
}
